# Maintainer: Dzmitry Sankouski <dsankouski@gmail.com>
pkgname=extract-dtb
pkgver=1.2.3
pkgrel=0
pkgdesc="Tool to split a kernel image with appended dtbs into separated kernel and dtb files"
url="https://github.com/PabloCastellano/extract-dtb"
arch="noarch"
license="GPL-3.0-or-later"
depends="python3"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/PabloCastellano/extract-dtb/archive/$pkgver.tar.gz"
options="!check" # no tests

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
	# https://github.com/PabloCastellano/extract-dtb/issues/13
	rm -v "$pkgdir"/usr/CHANGES.md "$pkgdir"/usr/LICENSE
}

sha512sums="
958d0ff8952a8582eb13ebf2fb12feaba792f571d7ccd2f92e62762787278ba3e4d0b86cda320877193fbc7e0d1eb5bf1ffca883e827669c54977b712c9d2f9c  extract-dtb-1.2.3.tar.gz
"
